/**
 * 文件上传API
 */

import request from './index.js'

// 文件上传API
export const uploadApi = {
  // 上传图片
  uploadImage(filePath, formData = {}) {
    return request.upload('/api/v1/sales/upload/image', {
      filePath,
      name: 'image',
      formData
    })
  },
  
  // 上传文件
  uploadFile(filePath, formData = {}) {
    return request.upload('/api/v1/sales/upload/file', {
      filePath,
      name: 'file',
      formData
    })
  }
}

export default uploadApi 